/*
	Name:9_T7
	Copyright:Take it at will
	Author:Rodney
	Date: 
	Description:
*/
#include<stdio.h>
#include<string.h>
int totsubstrnum(char *str,char *substr);
int main()
{
	char a[100],b[100];
	scanf("%s",a);
	getchar();
	scanf("%s",b);
	
	printf("%d\n",totsubstrnum(a,b));
}

int totsubstrnum(char *str,char *substr)
{
	int num=0;
	int i=0,j;
	bool tag=true;
	while(*(str+i+strlen(substr)-1)!='\0')
	{
		if(*(str+i)==*substr)
		{
			j=1;
			while(*(substr+j)!='\0')
			{
				if(*(str+i+j) != *(substr+j))
				{
					tag = false;
					break;
				}
				j++;
			}
			if(tag)	num++;
		}
		i++;
	}
	return num;
}

